package com.jye.rseven.user.serivce.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.jye.rseven.domain.CommentsReply;
import com.jye.rseven.service.CommentsReplyService;
import com.jye.rseven.user.mapper.CommentsReplyMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

@Service
public class CommentsReplyServiceImpl implements CommentsReplyService {

    @Autowired
    CommentsReplyMapper commentReplyMapper;

    @Override
    public String commentComByComment(CommentsReply commentsReply) {
        try {
            commentsReply.setCreateTime(new Date());
            commentReplyMapper.addComentsReply(commentsReply);
            return "评论成功!";
        }catch (Exception e){
            return "评论失败!";
        }

    }
}
